﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace UI.Forms
{
    public partial class view_card : FormBase1
    {
        public view_card()
        {
            InitializeComponent();
        }

        private void view_card_Load(object sender, EventArgs e)
        {
            lue_Client.Properties.DataSource = my.bw.View_Client_lite_List(false, my.ACID);
            lue_Client.Properties.DisplayMember = "ClientName";
            lue_Client.Properties.ValueMember = "ClientName";
            lue_ck.Properties.DataSource = my.bw.Warehouse_Get("", my.ACID);
            lue_ck.Properties.DisplayMember = "WarehouseName";
            lue_ck.Properties.ValueMember = "WarehouseName";
        }

        private void simpleButton1_Click(object sender, EventArgs e)
        {
            gridControl1.DataSource = my.bw.View_cards_Get(radioGroup1.Text, lue_Client.Text, lue_ck.Text, textEdit1.Text.Trim(), my.ACID);
        }

        private void simpleButton2_Click(object sender, EventArgs e)
        {
            textEdit1.Text = "";
            lue_ck.EditValue = null;
            lue_Client.EditValue = null;
            radioGroup1.EditValue = null;
        }
    }
}